<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vector Preview</title>
</head>
<body>
<img id="image" src=""><br><br>
<a id="svg_source">svg source</a><br>
<a id="java_source">java source</a><br>
<a id="vector_source">vector source</a>


</body>
<script>
    var image = decodeURI(queryURLParam("image"));
    var img = document.querySelector("img");
    img.src = "" + image;
    img.onclick = function () {
        img.width = img.width * 1.5;
        img.height = img.height * 1.5;
    }

    function queryURLParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        return r != null ? r[2] : "";
    }

    var profix = "https://raw.githubusercontent.com/MegatronKing/SVG-Android/master/docs/";

    var svg = document.getElementById("svg_source");
    svg.href = profix + image;

    var vector = document.getElementById("vector_source");
    vector.href = profix + replaceExtension(image.replace("svg", "vector"), "xml");

    var java = document.getElementById("java_source");
    java.href = profix + replaceExtension(image.replace("svg", "java"), "java");

    function replaceExtension(s, extension) {
        return s.split(".")[0] + "." + extension;
    }

</script>
<style>
    img {
        width: 256px;
        height: 256px;
    }
</style>
</html>